Undelete delete browsers from Invocation cancellation#16
Merged
hiroTamada merged 2 commits intomainfrom Sep 24, 2025
Merged
Conversation
There was a problem hiding this comment.
Performed full review of fa40463...888cb19
Analysis
- The use of context.Background() instead of the cancellation context could potentially lead to unbound cleanup operations if the original request timeout was triggered for a valid reason.
- The change addresses browser cleanup during cancellation, but there's no mention of verifying if this creates any race conditions or potential edge cases in the cleanup process.
- While following existing patterns in the codebase is generally good, it's worth examining if the current timeout values are appropriate for this specific cleanup scenario.
Tip
⚡ Quick Actions
This review was generated by Mesa.
Actions:
Slash Commands:
/review- Request a full code review/review latest- Review only changes since the last review/describe- Generate PR description. This will update the PR body or issue comment depending on your configuration/help- Get help with Mesa commands and configuration options
1 files reviewed | 0 comments | Review on Mesa | Edit Reviewer Settings
rgarcia
approved these changes
Sep 24, 2025
Contributor
rgarcia
left a comment
There was a problem hiding this comment.
I think the order should be reversed since if we destroy browsers first it might dump error logs into the invocation that are red herrings
rgarcia
approved these changes
Sep 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Restores the logic to delete browsers when an invocation is cancelled.
Why we made these changes
This fixes a regression where cancelling an invocation would leave orphaned browser instances running, consuming unnecessary resources. This change ensures proper resource cleanup.
What changed?
cmd/invoke.go, the invocation cancellation handler now callsclient.Invocations.DeleteBrowserswith a 30-second timeout to ensure associated browsers are properly terminated.Description generated by Mesa. Update settings